<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>深航服务信息系统</title>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
</head>

<body leftmargin="0" topmargin="0">
<html:form action="vipServiceSheet" method="post" styleId="vipServiceSheetForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title">
    <img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">
     &nbsp;高端旅客服务申请单审核</td>
  </tr>
  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <c:if test="${isInclude==null}">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        </c:if>
        <logic:messagesPresent>
		<tr id="messagesPresentTrId" style="display:;">
			<td valign="top" class="black12" height="20">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td class="arror_bg">
							<span class="arror_title">
						     您的操作存在如下错误：<br></span>
						     <html:errors/>
					    </td>
				    </tr>
			    </table>
			</td>
		</tr>
       </logic:messagesPresent>
        <tr> 
          <td class="home-table-leftline">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content"> 
                <input type="button" class="home-inputBtn" value="保存"  onclick="doCommit()" 
                <logic:messagesNotPresent>
                <c:if test="${'' ne vipServiceSheetForm.procInstId}">disabled</c:if>
                </logic:messagesNotPresent>
                />
                
                <%--html:submit styleClass="home-inputBtn" property="method.save">
            			<fmt:message key="button.save"/>
				</html:submit--%>
				<html:reset styleClass="home-inputBtn">
	            			<fmt:message key="button.reset"/>
				</html:reset>
	        	<html:cancel styleClass="home-inputBtn" property="method.cancel">
	            			<fmt:message key="button.cancel"/>
				</html:cancel>
				<input type="button" class="home-inputBtn"   onclick="onStartFlow();return false;" value="发起流程" 
				<logic:messagesNotPresent>
				<c:if test="${'' ne vipServiceSheetForm.procInstId}">disabled</c:if>
				</logic:messagesNotPresent>
				/>

				</td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
             
              <tr> 
                <td valign="top" class="home-edittable-space">
                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
				<html:hidden property="id"/>
				<html:hidden property="vipInfoId"/>
				<input type="hidden" name="vipAction" value="app"/>
				<!-- 
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				<sasis:label   key="vipServiceSheetForm.passengerId"/>
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<c:out value="${vipServiceSheetForm.passengerId}"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				<sasis:label   key="vipServiceSheetForm.vipInfoId"/>
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<c:out value="${vipServiceSheetForm.vipInfoId}"/>
				</td>
				</tr> -->
				
				<tr>
				<td width="30%" class="home-subtable-view-tdstyle-right">&nbsp;
				航班号：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="flightNum" styleId="flightNum" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/> 
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				日期：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="flightDate" styleId="flightDate" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				
				<tr>
				<td width="30%" class="home-subtable-view-tdstyle-right">&nbsp;
				出发站：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="fromPortName" styleId="fromPortName" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				终点站：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="toPortName" styleId="toPortName" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				姓名：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="name" styleId="name" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				身份证号：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="idCard" styleId="idCard" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				性别：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:hidden property="gender" styleId="gender"/>
				<c:choose>
				<c:when test="${vipServiceSheetForm.gender=='1'}">男</c:when>
				<c:otherwise>女</c:otherwise>
				</c:choose>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				职务：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="duty" styleId="duty" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				旅客类型：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:hidden property="vipTypeId"/>
				<html:text property="vipTypeName" styleId="vipTypeName" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				联系电话：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="mobile" styleId="mobile" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				订座编码：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="bookNumb" styleId="bookNumb" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				舱位等级：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:hidden property="order" styleId="order"/>
			    <c:choose>
				<c:when test="${vipServiceSheetForm.order=='F'}">头等舱</c:when>
				<c:when test="${vipServiceSheetForm.order=='C'}">公务舱</c:when>
				<c:otherwise>经济舱</c:otherwise>
				</c:choose>
				</td>
				</tr>
				
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				随行人员：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="retinueName" styleId="retinueName" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				随行人数：
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<html:text property="retinueNum" styleId="retinueNum" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				随行人员舱位等级：
				</td>
				<td class="home-subtable-view-tdstyle-left" colspan="3">
				<html:hidden property="retinueOrder" styleId="retinueOrder"/>
			    <c:choose>
				<c:when test="${vipServiceSheetForm.retinueOrder=='F'}">头等舱</c:when>
				<c:when test="${vipServiceSheetForm.retinueOrder=='C'}">公务舱</c:when>
				<c:otherwise>经济舱</c:otherwise>
				</c:choose>
				</td>
				</tr>
				
				<tr>
			<td class="home-subtable-view-tdstyle-right">
			 &nbsp;服务标准：
			</td>
			<td class="home-subtable-view-tdstyle-left" colspan="3">
			 <table>
                  <tr> 
                    <tr>
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="bookTicket" styleId="bookTicket" value="1"/> 
					 1 预定机票
					</td>
					
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="provideFood" styleId="provideFood" value="1"/> 
					 2 准备餐食
					</td>
					
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="sentCar" styleId="sentCar" value="1"/> 
					 3 安排车辆送机
					</td>
                  </tr>
                  <tr> 
                    <td class="home-subtable-view-tdstyle-left">
                   <html:checkbox property="boardCheck" styleId="boardCheck" value="1"/> 
                      4 代办登机牌</td>
                    <td class="home-subtable-view-tdstyle-left">
                   <html:checkbox property="receivedMan" styleId="receivedMan" value="1"/> 
                      5 指派迎接人员</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="visitantRoom" styleId="visitantRoom" value="1"/> 
                      6 贵宾室接待</td>
                  </tr>
                  <tr> 
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="cabinService" styleId="cabinService" value="1"/> 
                      7 机上客舱服务</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="receivedCar" styleId="receivedCar" value="1"/> 
                      8 安排车辆接机</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="other" styleId="other" value="1"/> 
                      9 礼仪物品准备</td>
                  </tr>
            </table>
			</td>
			</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				服务提示：
				</td>
				<td class="home-subtable-view-tdstyle-left" colspan="3">
				<html:text property="serviceHint" styleId="serviceHint" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				餐食要求：
				</td>
				<td class="home-subtable-view-tdstyle-left"  colspan="3">
				<html:text property="foodDesire" styleId="foodDesire" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				服务要求：
				</td>
				<td class="home-subtable-view-tdstyle-left"  colspan="3">
				<html:text property="serviceDesire" styleId="serviceDesire" readonly="true"
			       style="border:0" styleClass="home-subtable-view-tdstyle-left"/>
				</td>
				</tr>
				<!-- 
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				<sasis:label   key="vipServiceSheetForm.operator"/>
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<c:out value="${vipServiceSheetForm.operator}"/>
				</td>
				</tr>
				<tr>
				<td width="20%" class="home-subtable-view-tdstyle-right">&nbsp;
				<sasis:label   key="vipServiceSheetForm.operateDate"/>
				</td>
				<td class="home-subtable-view-tdstyle-left">
				<c:out value="${vipServiceSheetForm.operateDate}"/>
				</td>
				</tr> -->
                    </table>
                    </td>
                   </tr>
                  </table> 
                </td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space" width="100%">
                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                    <tr> 
                      <td class="home-table-tool-content">审核情况</td>
                    </tr>
                    <tr>
                      	<td>
	                      	<table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
	                          <tr> 
	                            <td width="20%" class="home-subtable-view-tdstyle-right"><font color="red">*</font>审核结果：</td>
	                            <td width="20%" class="home-subtable-view-tdstyle-left">
					               <html:select name="vipServiceSheetForm" property="approved" size="1" styleId="approved">
									  <html:option value="">&nbsp;</html:option>
									  <html:option value="0">同意</html:option>
									  <html:option value="1">不同意</html:option>
									</html:select> 
				                </td>
	                            <td width="20%" class="home-subtable-view-tdstyle-right">审核意见：</td>
	                            <td class="home-subtable-view-tdstyle-left">
	                            <html:text property="suggestion" styleId="suggestion" styleClass="home-table-inputbox" size="40" /> 
	                            </td>
	                          </tr>
	                        </table>
			           </td>
                    </tr>
                  </table> 
                </td>
              </tr>
            </table>
		  </td>
        </tr>
        <tr> 
          <td height="12">
		   <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr>
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
<script>
	function doCommit(){
		vipServiceSheetForm.method="post";
		vipServiceSheetForm.action="vipServiceSheet.html?method=save&vipAction=app&id=<c:out value="${param.id}"/>";
		vipServiceSheetForm.submit();
	}
	function onStartFlow(){
		if(confirm("确定要发起流程吗?")){
			var newElts = pushElts();
			if(newElts+'' != oldAry+''){
				if(confirm("你记录已修改,需要保存吗?")){
					doCommit(); 
					return;
				}else{
					vipServiceSheetForm.reset();
					return;
				}
			}
			var approved = document.getElementById('approved').value;
			if('0'!=approved){
				alert("该流程还没审批!");
				return false;
			}else {
				//清除堆栈 add by kellen 07-09-08
				newElts.removeAll();
				oldAry.removeAll();
				//提交流程表单
				vipServiceSheetForm.method="post";
				vipServiceSheetForm.action="vipServiceSheet.html?method=start";
				vipServiceSheetForm.submit();
		
			}
		}
	}
	//删除array内存堆栈
	Array.prototype.removeAll = function() { while(this.length > 0) this.pop(); } 
	
	
	//把记录痕迹放在堆栈里面
	function pushArray(){
		var len = document.forms[0].elements.length;
		var ary = new Array();
		for(var i=0;i<len;i++){
			var elts = document.forms[0].elements[i]; 
			if('checkbox' == elts.type){
				if(elts.checked){
					ary.push(1);
				}else ary.push(null);  
				 
			} 
			
		}
		return ary;
	}
	
	//记录上一步记录
	var oldAry = pushElts();
	
	//判断记录痕迹被修改 add by kellen
	function pushElts(){
		var ary = pushArray();  
		var approved = document.getElementById('approved').value;
		var approvedMemo = document.getElementById('suggestion').value;
		 
		
		ary.push(approved);
		ary.push(approvedMemo);
		
		return ary;
	}
	
	 
</script>
</body>
</html> 